#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include "newgamedialog.h"
#include "gamesettings.h"
#include "minionselectiondialog.h"
#include "gamesummarydialog.h"
#include "../GameInterface/basicinterface.h"
#include "../GameInterface/gameinterface.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    QString GetPlayerName();

    void ShowMainMenu();
    void PrepareGame(GameSettings &Settings);
    void StartGame(GameSettings &Settings);
    void EndGame();

public slots:
    void Tick();
    void paintEvent(QPaintEvent *);

private slots:
    void on_NewGameButton_clicked();

private:
    Ui::MainWindow *ui;
    QTimer GameTimer;

    GameInterface *MyInterface;
    NewGameDialog *NewGameWindow;
    MinionSelectionDialog *MinionSelectionWindow;
    GameSummaryDialog *GameSummaryWindow;

    GameSettings CurrentGameSettings;
    int PreGameCountdown;

    const unsigned int MaxTicksPerSecond = 40;
    unsigned int TicksCounter;
    const unsigned int TicksAI = MaxTicksPerSecond / 4;
};

#endif // MAINWINDOW_H
